﻿using System;

namespace PicServer.Services
{
    public static class MainService
    {
        public static void Start(Model.ServiceStartType startType,
                                 String fileFolderPath, 
                                 Int64 fileMaxSize, 
                                 Int32 perfileMaxSize,
                                 Int32 tableCount,
                                 String picServerWebUri,
                                 String picServerUri)
        {
            //启动文件服务
            BLL.FileService.Start(fileFolderPath, fileMaxSize, perfileMaxSize, startType);
            //启动wcf服务
            Services.PicServiceHost.Start(picServerUri, picServerWebUri);
            //启动表名服务
            DAL.FileDBTableManagerServer.Start(tableCount);
        }

        public static void Stop()
        {
            BLL.FileService.Stop();
            Services.PicServiceHost.Stop();
        }
    }
}
